/*
 * Licensed to The Apereo Foundation under one or more contributor license
 * agreements. See the NOTICE file distributed with this work for additional
 * information regarding copyright ownership.
 *
 *
 * The Apereo Foundation licenses this file to you under the Educational
 * Community License, Version 2.0 (the "License"); you may not use this file
 * except in compliance with the License. You may obtain a copy of the License
 * at:
 *
 *   http://opensource.org/licenses/ecl2.txt
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
 * License for the specific language governing permissions and limitations under
 * the License.
 *
 */


.cal {
    display: block;
    width: 216px;
    margin: 20px 20px 15px;
    border: $thin-border-stroke #ccc;
    text-shadow: none;

    &.left {
        float: left;
    }

    &.right {
        float: right;
    }

    &.large-cal {
        box-sizing: border-box;
        width: 100%;
        margin: 0;
        border-bottom: none;
        table-layout: fixed;

        td {
            width: 1%;
            box-sizing: content-box;
        }
    }

    a {
        text-decoration: none;
    }

    caption {
        display: block;
        line-height: 32px;
        font-weight: 600;
        color: #fff;
        text-align: center;
        margin: -1px -1px 0px -1px;
        border: $thin-border-stroke darken($l-blue, 10%);
        @include linear-gradient(top, #388ed6, #2b77b9);

        a {
            display: block;
            line-height: 32px;
            padding: 0 10px;
            font-size: 15px;
            color: #fff;

            &:hover {
                color: white;
            }
        }

        .prev {
            float: left;
        }

        .next {
            float: right;
        }
    }

    th,
    td {
        width: 30px;
        text-align: center;

        &:first-child {
            border-left: 0;
        }
    }

    th {
        line-height: 20px;
        font-size: 8px;
        color: #696969;
        text-transform: uppercase;
        background: #f3f3f3;
        border-left: 1px solid #f3f3f3;
    }

    td {
        font-size: 11px;
        font-weight: bold;
        border-top: 1px solid #c2c2c2;
        border-left: 1px solid #c2c2c2;

        a {
            clear: both;
            display: block;
            position: relative;
            width: 100%;
            line-height: 28px;
            color: #666;
            background: #fff;
        }

        a:hover,
        &.off a {
            background: #f3f3f3;
        }

        &.off a {
            color: #b3b3b3;
        }

        &.active a,
        a:active {
            margin: -1px;
            color: #f3f3f3;
            background: $l-blue;
            border: $thin-border-stroke darken($l-blue, 15%);
        }

        &.active:first-child a,
        &:first-child a:active {
            border-left: 0;
            margin-left: 0;
        }

        &.active:last-child a,
        &:last-child a:active {
            border-right: 0;
            margin-right: 0;
        }
    }

    tr:last-child {
        td.active a,
        td a:active {
            border-bottom: 0;
            margin-bottom: 0;
        }
    }
}
